package com.link2room.optimus.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by sss on 2016/9/1.
 */
@Entity
@Table(name = "marketing_campaigns",catalog = "")
@DynamicInsert
public class MarketingCampaigns extends BaseEntity{
    public enum MarketingCampaigns_{
        mcCode,mcName,descript,descriptM,startDate,endDate,
        rsvStartDate,rsvEndDate,noRsvStartDate,noRsvEndDate,
        createBy,isLong,isAllow,mcTag,countTag,isAudit,useRealAvail,
    }

    /**
     * 活动代码
     */
    private String mcCode;
    /**
     * 活动名称
     */
    private String mcName;
    private String mcNameEn;
    /**
     * 活动描述
     */
    private String descript;
    private String descriptEn;
    /**
     * 移动版活动描述
     */
    private String descriptM;
    private String descriptMEn;
    /**
     * 基价代码
     */
    private String priceCode;
    /**
     * 活动开始时间
     */
    private Date startDate;
    /**
     * 活动结束时间
     */
    private Date endDate;
    /**
     * 可预订开始时间
     */
    private Date rsvStartDate;
    /**
     * 可预订结束时间
     */
    private Date rsvEndDate;
    /**
     * 由集团OR酒店创建
     */
    private String createBy;
    /**
     * 是否长期活动：T/F
     */
    private String isLong;
    /**
     * 是否允许酒店操作：T/F
     */
    private String isAllow;
    /**
     * 是否使用完全房量：T/F
     */
    private String useRealAvail;
    /**
     * 是否启用设置量
     */
    private String useSetNum;
    /**
     * 活动标签
     */
    private String mcTag;
    /**
     * 统计标签
     */
    private String countTag;
    /**
     * 是否已审核：T/F
     */
    private String isAudit;
    /**
     * 是否下单到PMS
     */
    private String isToPms;
    @Basic
    @Column(name = "mc_code", nullable = false, length = 64)
    public String getMcCode() {
        return mcCode;
    }

    public void setMcCode(String mcCode) {
        this.mcCode = mcCode;
    }

    @Basic
    @Column(name = "mc_name", nullable = false, length = 64)
    public String getMcName() {
        return mcName;
    }

    public void setMcName(String mcName) {
        this.mcName = mcName;
    }

    @Basic
    @Column(name = "mc_name_en", nullable=true, length = 64)
    public String getMcNameEn() {
        return mcNameEn;
    }

    public void setMcNameEn(String mcNameEn) {
        this.mcNameEn = mcNameEn;
    }

    @Basic
    @Column(name = "descript", nullable = true, length = 255)
    public String getDescript() {
        return descript;
    }

    public void setDescript(String descript) {
        this.descript = descript;
    }

    @Basic
    @Column(name = "descript_en", nullable = true, length = 255)
    public String getDescriptEn() {
        return descriptEn;
    }

    public void setDescriptEn(String descriptEn) {
        this.descriptEn = descriptEn;
    }

    @Basic
    @Column(name = "descript_m", nullable = true, length = 255)
    public String getDescriptM() {
        return descriptM;
    }

    public void setDescriptM(String descriptM) {
        this.descriptM = descriptM;
    }

    @Basic
    @Column(name = "descript_m_en", nullable = true, length = 255)
    public String getDescriptMEn() {
        return descriptMEn;
    }

    public void setDescriptMEn(String descriptMEn) {
        this.descriptMEn = descriptMEn;
    }

    @Basic
    @Column(name = "price_code", nullable = false, length = 32)
    public String getPriceCode() {
        return priceCode;
    }

    public void setPriceCode(String priceCode) {
        this.priceCode = priceCode;
    }

    @Basic
    @Column(name = "start_date", nullable = false)
    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    @Basic
    @Column(name = "end_date", nullable = true)
    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    @Basic
    @Column(name = "rsv_start_date", nullable = true)
    public Date getRsvStartDate() {
        return rsvStartDate;
    }

    public void setRsvStartDate(Date rsvStartDate) {
        this.rsvStartDate = rsvStartDate;
    }

    @Basic
    @Column(name = "rsv_end_date", nullable = true)
    public Date getRsvEndDate() {
        return rsvEndDate;
    }

    public void setRsvEndDate(Date rsvEndDate) {
        this.rsvEndDate = rsvEndDate;
    }

    @Basic
    @Column(name = "create_by", nullable = true, length = 32)
    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    @Basic
    @Column(name = "is_long", nullable = false, length = 16)
    public String getIsLong() {
        return isLong;
    }

    public void setIsLong(String isLong) {
        this.isLong = isLong;
    }

    @Basic
    @Column(name = "is_allow", nullable = false, length = 2)
    public String getIsAllow() {
        return isAllow;
    }

    public void setIsAllow(String isAllow) {
        this.isAllow = isAllow;
    }

    @Basic
    @Column(name = "use_real_avail", nullable = false, length = 2)
    public String getUseRealAvail() {
        return useRealAvail;
    }

    public void setUseRealAvail(String useRealAvail) {
        this.useRealAvail = useRealAvail;
    }

    @Basic
    @Column(name = "use_set_num", nullable = false, length = 2)
    public String getUseSetNum() {
        return useSetNum;
    }

    public void setUseSetNum(String useSetNum) {
        this.useSetNum = useSetNum;
    }

    @Basic
    @Column(name = "mc_tag", nullable = true, length = 64)
    public String getMcTag() {
        return mcTag;
    }

    public void setMcTag(String mcTag) {
        this.mcTag = mcTag;
    }

    @Basic
    @Column(name = "count_tag", nullable = true, length = 16)
    public String getCountTag() {
        return countTag;
    }

    public void setCountTag(String countTag) {
        this.countTag = countTag;
    }

    @Basic
    @Column(name = "is_to_pms", nullable = true, length = 2)
    public String getIsToPms() {
        return isToPms;
    }

    public void setIsToPms(String isToPms) {
        this.isToPms = isToPms;
    }

    @Basic
    @Column(name = "is_audit", nullable = false, length = 2)
    public String getIsAudit() {
        return isAudit;
    }

    public void setIsAudit(String isAudit) {
        this.isAudit = isAudit;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MarketingCampaigns that = (MarketingCampaigns) o;

        if (mcCode != null ? !mcCode.equals(that.mcCode) : that.mcCode != null) return false;
        if (mcName != null ? !mcName.equals(that.mcName) : that.mcName != null) return false;
        if (descript != null ? !descript.equals(that.descript) : that.descript != null) return false;
        if (descriptM != null ? !descriptM.equals(that.descriptM) : that.descriptM != null) return false;
        if (startDate != null ? !startDate.equals(that.startDate) : that.startDate != null) return false;
        if (endDate != null ? !endDate.equals(that.endDate) : that.endDate != null) return false;
        if (rsvStartDate != null ? !rsvStartDate.equals(that.rsvStartDate) : that.rsvStartDate != null) return false;
        if (rsvEndDate != null ? !rsvEndDate.equals(that.rsvEndDate) : that.rsvEndDate != null) return false;
        if (createBy != null ? !createBy.equals(that.createBy) : that.createBy != null) return false;
        if (isLong != null ? !isLong.equals(that.isLong) : that.isLong != null) return false;
        if (isAllow != null ? !isAllow.equals(that.isAllow) : that.isAllow != null) return false;
        if (mcTag != null ? !mcTag.equals(that.mcTag) : that.mcTag != null) return false;
        if (countTag != null ? !countTag.equals(that.countTag) : that.countTag != null) return false;
        if (isAudit != null ? !isAudit.equals(that.isAudit) : that.isAudit != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = mcCode != null ? mcCode.hashCode() : 0;
        result = 31 * result + (mcName != null ? mcName.hashCode() : 0);
        result = 31 * result + (descript != null ? descript.hashCode() : 0);
        result = 31 * result + (descriptM != null ? descriptM.hashCode() : 0);
        result = 31 * result + (startDate != null ? startDate.hashCode() : 0);
        result = 31 * result + (endDate != null ? endDate.hashCode() : 0);
        result = 31 * result + (rsvStartDate != null ? rsvStartDate.hashCode() : 0);
        result = 31 * result + (rsvEndDate != null ? rsvEndDate.hashCode() : 0);
        result = 31 * result + (createBy != null ? createBy.hashCode() : 0);
        result = 31 * result + (isLong != null ? isLong.hashCode() : 0);
        result = 31 * result + (isAllow != null ? isAllow.hashCode() : 0);
        result = 31 * result + (mcTag != null ? mcTag.hashCode() : 0);
        result = 31 * result + (countTag != null ? countTag.hashCode() : 0);
        result = 31 * result + (isAudit != null ? isAudit.hashCode() : 0);
        return result;
    }
}
